#include "iostream"
#include "cstdio"
#include "cstring"

using namespace std;

int main() {
    char t[1000000], s[1000000];
    while (cin >> s >> t)
    {
        int c = 0, i = 0, j = 0, n = strlen(t), sn = strlen(s);
        while (j < n) {
            if(s[i] == t[j])
            {
                i = i + 1;
                c = c + 1;
            }
            j = j + 1;
        }
        if(c == sn)
            printf("Yes\n");
        else
            printf("No\n");
    }
    return 0;
}